package com.atguigu.gulimail.auth.feign;

import com.atguigu.common.utils.R;
import com.atguigu.gulimail.auth.vo.SocialUser;
import com.atguigu.gulimail.auth.vo.UserLoginVo;
import com.atguigu.gulimail.auth.vo.UserRegistVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("gulimail-member")
@Component
public interface MemberFeign {

    @PostMapping("member/member/regist")
    R regist(@RequestBody UserRegistVo registVo);

    @PostMapping("member/member/login")
    R login(@RequestBody UserLoginVo loginVo);

    @PostMapping("member/member/oauth2/login")
    R login(@RequestBody SocialUser user);

    @PostMapping("member/member/username")
    R getByUserName(@RequestBody String userName);
}
